module.exports = {
	/*
	 ** Headers of the page
	 */
	server:{
		host:'localhost',
		port:'1000'
	},
	head: {
		title: '信合红谷',
		meta: [{
				charset: 'utf-8'
			},
			{
				name: 'viewport',
				content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no',
				//禁止用户用手势缩放网页
				// content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'
			},
			{
				hid: 'description',
				name: 'description',
				content: 'Nuxt.js project'
			}
		],
		link: [{
			rel: 'icon',
			type: 'image/x-icon',
			href: '/logo.png'
		}],
		script:[{
			src:'/lib-flexible/flexible.js', type: 'text/javascript', charset: 'utf-8'
		}]
	},
	/*
	 ** Customize the progress bar color
	 */
	loading: {
		color: '#3B8070'
	},
	/*
	 ** Build configuration
	 */
	css: [],
	//插件：类似vue-cli的main.js拆分了引入
	plugins: [{
		src:'~plugins/babel-polyfill',
		ssr: true
	},{
		src: "~plugins/axios",
		ssr: true
	}, {
		src: "~plugins/cookie",
		ssr: false
	}, {
		src: '~plugins/ui',
		ssr: true
	}, {
		src: '~plugins/baseurl',
		ssr: false
	}],
	//模块：在context和this都可以使用，属性名称为$axios
	modules: [
		'@nuxtjs/axios'
	],
	// 路由配置/中间件：所有路由的vue组件都引用这个中间件
	router: {
		middleware: ['userAuth','borwser'],
		prefetchLinks: false//禁止js预加载
	},
	build: {
		/*
		 ** Run ESLint on save
		 */
		postcss: [
			require('postcss-px2rem-exclude')({
		  	"remUnit": 75,
		  	"exclude": /node_modules/i
		  })
		],
		extend(config, {
			isDev,
			isClient
		}) {
			if (isDev && isClient) {
				// config.module.rules.push({
				// 	enforce: 'pre',
				// 	test: /\.(js|vue)$/,
				// 	loader: 'eslint-loader',
				// 	exclude: /(node_modules)/
				// })
			}
		}
	}
}